﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucComment" TagName="Comment" Src="../Common/Inc/Comment.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Crd2020r.aspx.cs" Inherits="Updms.Crd.Crd2020r" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>▒ UPDMS [Crd2020r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->	
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Crd2020r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClientClick="return chkSearch(event)" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="11%"><a href="javascript:void(0);" title="전체선택/해제" onclick="checkBoxCheckTable('cbl_search_card_cd')"><u><asp:Literal id="ltr_search_card_cd" Text="카드" runat="server" /></u></a></td>
					<td class="ctl" width="66%"><asp:CheckBoxList id="cbl_search_card_cd" runat="server" RepeatDirection="Horizontal" CssClass="cbl_flow"></asp:CheckBoxList></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_base_dt" Text="기준일" runat="server" /></td>
					<td class="ctl" width="11%"><asp:textbox id="txt_search_base_dt" runat="server" CssClass="ib_b_dt"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_search_base_dt" class="ci_calendar" runat="server"></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 디테일1 시작 -->
			<!-- 디테일1 끝 -->
			<!-- 리스트셋 시작 -->
			<table id="table_list_set" cellpadding="0" cellspacing="0" border="0" width="100%" runat="server">
				<tr>
					<td>
						<!-- 리스트 시작 -->
						<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="Account" ShowFooter="True">
							<Columns>
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Left" Width="19%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_Year_Dt" DataFormatString="{0:#,##0}" HeaderText="전년" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_3_Month_Dt" DataFormatString="{0:#,##0}" HeaderText="3개월전" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_2_Month_Dt" DataFormatString="{0:#,##0}" HeaderText="2개월전" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_1_Month_Dt" DataFormatString="{0:#,##0}" HeaderText="전월" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Base_Dt" DataFormatString="{0:#,##0}" HeaderText="기준일" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_Year_Base_Diff" DataFormatString="{0:#,##0}" HeaderText="전년대비" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_3_Month_Base_Diff" DataFormatString="{0:#,##0}" HeaderText="3개월전대비" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_2_Month_Base_Diff" DataFormatString="{0:#,##0}" HeaderText="2개월전대비" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
								<asp:BoundField DataField="Pre_1_Month_Base_Diff" DataFormatString="{0:#,##0}" HeaderText="전월대비" HtmlEncode="False">
									<ItemStyle HorizontalAlign="Right" Width="9%" />
								</asp:BoundField>
							</Columns>							
						</asp:GridView>
						<!-- 리스트 끝 -->
					</td>
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			<!-- 설명 시작 -->
			<ucComment:Comment id="Comment" TagPrefixs="Crd2020r" runat="server"></ucComment:Comment>
			<!-- 설명 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
			<asp:label id="lbl_pk" runat="server"></asp:label>
			<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			</div>
			<!-- 히든값 끝 -->
			<!-- CalendarExtender 시작 -->
			<act:CalendarExtender ID="ce_search_base_dt" 
				runat="server"
				TargetControlID="txt_search_base_dt"
				Format="yyyy-MM-dd"
				PopupButtonID="ci_search_base_dt" 
				BehaviorID="bi_search_base_dt" 
				CssClass="calendar">
			</act:CalendarExtender>
			<!-- CalendarExtender 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>	
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//검색
	function chkSearch(evt) {
		var lb_checked_item = false;
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		//체크박스 갯수
		var cb_cnt_card = getCheckBoxCntOnTable("cbl_search_card_cd");

		//카드체크여부
		for (var i = 0; i < cb_cnt_card; i++) {
			var cb = $("cbl_search_card_cd_" + i);
			if (cb.checked) {
				lb_checked_item = true;
			}
		}
		
		if (!lb_checked_item) {
			msgBox.alert(getMsg(MSG_ERR_023), null, null, keyCode); //하나이상의 카드를 선택하세요
			return false;
		}

		//날짜체크
		if (!isDateHyphen($F("txt_search_base_dt"))) {
			msgBox.alert(getMsg(MSG_ERR_082), setFocus, "txt_search_base_dt", keyCode); //잘못된 날짜형식입니다.(YYYY-MM-DD)
			return false;
		}

		return true;
	}

	//엔터검색
	function enterSearchOnPage(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		if (keyCode == 13) {
			if (chkSearch(evt)) {
				__doPostBack('ibtn_search', '');
			}
		}
	}

</script>
</body>
</html>